import { http } from '@/utils/request'
import type { NoticeListType, NumberType } from './type'

// 列表
export const getNoticeList = (pageNum: number, pageSize: number, user_id: string, message_type: string) => {
    return http.get<NoticeListType>('/message/get_message', { pageNum, pageSize, user_id, message_type })
}

// 获取所有类型数量
export const getAllTypeNUmber = (user_id: string) => {
    return http.get<NumberType>('/message/get_undead_message_num', { user_id })
}

//标记已读，全部已读
export const clickMessage = (data: { is_all_read: number, user_id: string, message_ids: any[] }) => {
    return http.put<{statusCode:number}>('/message/read_message', data)
}